package cn.hk.archives.service.impl;

import cn.hk.archives.domain.ArchivesGravida;
import cn.hk.archives.domain.vo.ArchivesVo;
import cn.hk.archives.mapper.ArchivesGravidaMapper;
import cn.hk.archives.service.ArchivesGravidaService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 孕产妇建档信息表 服务实现类
 * </p>
 *
 * @author xu
 * @since 2023-05-17
 */
@Service
public class ArchivesGravidaServiceImpl extends ServiceImpl<ArchivesGravidaMapper, ArchivesGravida> implements ArchivesGravidaService {
    @Autowired
    private ArchivesGravidaMapper archivesGravidaMap;
    @Override
    public ArchivesVo getUserArchivesGravidaByUserId(Long userId) {
        return archivesGravidaMap.selectUserArchivesGravidaByUserId(userId);
    }

    @Override
    public Boolean addArchivesGravida(ArchivesVo archivesVo) {
        return archivesGravidaMap.insertArchivesGravida(archivesVo);
    }

    @Override
    public Boolean editArchivesGravida(ArchivesVo archivesVo) {
        return archivesGravidaMap.updateArchivesGravida(archivesVo);
    }
}
